import { createStore } from 'vuex'
import createPersistedState from "vuex-persistedstate";
// 三个模块
import user from "./modules/user";
import cart from "./modules/cart";
import category from "./modules/category";

export default createStore({
	modules: {
		// moduleA,
		// moduleB
		user,
		cart,
		category
	},
	// 配置插件
	plugins: [
		createPersistedState({
			// 本地存储的名字
			key:'erabbit-client-pc-store',
			// 制定需要存储的模块
			paths:['user','cart']
		})
	],
})
